package io;

import javafx.print.Printer;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;

/**
 * PrintWrite,是一个高级流，可以按行写字符串
 */
public class WriteStringDemo2 {
    public static void main(String[] args) throws FileNotFoundException {
        FileOutputStream fis=new FileOutputStream("demo.txt");

        PrintWriter pw=new PrintWriter(fis);
        pw.println("固定价格肯定拒绝");
        pw.println("水电费搜i啊监管机构");
        System.out.println("写入完毕");
        pw.close();
    }
}
